<template>
  <div class="widgets-sidebar-collapse">
    <i :class="[isMenuCollapse ? 'sv-icon-expand' : 'sv-icon-fold']" @click="handleCollapse"></i>
  </div>
</template>

<script setup>
import { storeToRefs } from 'pinia'
import { useThemeStore } from '@/stores/theme'

const themeStore = useThemeStore()
const { isMenuCollapse } = storeToRefs(themeStore)

function handleCollapse() {
  isMenuCollapse.value = !isMenuCollapse.value
}
</script>

<style lang="scss" scoped>
.widgets-sidebar-collapse {
  font-size: 1.25em;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
</style>
